Showing posts with label prefer. Show all posts
Showing posts with label prefer. Show all posts

Sunday, March 25, 2012

Can I dynamically add subreports to a report?

Is there any way of adding subreports to a "container" report at runtime?
I need to make the reports composable and would prefer not to have the
superset of all reports in the container and just toggle visibility. Right
now the only solution seems to be to generate my own RDL on-the-fly, which
seems like using a sledge hammer to crack a nut.
Any help would be appreciated.
Thanks
StuOn Apr 26, 10:52 am, Stu <s...@.community.nospam> wrote:
> Is there any way of adding subreports to a "container" report at runtime?
> I need to make the reports composable and would prefer not to have the
> superset of all reports in the container and just toggle visibility. Right
> now the only solution seems to be to generate my own RDL on-the-fly, which
> seems like using a sledge hammer to crack a nut.
> Any help would be appreciated.
> Thanks
> Stu
Aside from creating the RDL files via ASP.NET application (custom as
you mentioned), you could include the normal subreports directly as
tables in the main report and then just toggle the visibility based on
if data is returned as part of the dataset (assuming each table
control will have its own dataset). Something like this might work (as
part of the Visibility expression):
=iif(Sum(Fields!SomeFieldName.Value, "SomeDataSetName") > 0, "true",
"false")
Also, you might want to include several table controls in a rectangle
to conserver space when they are not displayed.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks Enrique. I think creating the RDL files via the ASP.NET application
suits my purposes more than the "toggle visibility" approach. This is mainly
because there are many containers and many sub reports and there can be any
combination of them. So if someone adds a new subreport I would have to go
and add it at design time to all the containers. If I create the RDL myself I
can just create the requested combination on-the-fly.

Monday, March 19, 2012

Can I assign rowguid from the client code instead of using default newid()?

Do I have to use default newid() for the rowguid? I would prefer to pass a
sequential GUID from the client code instead.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-replication/200701/1
Or can I at least use newsequentialid() instead of newid() as the ROWGUID
default?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-replication/200701/1
|||Alex,
Yes,
CREATE TABLE dbo.Table1
(
test uniqueidentifier NOT NULL ROWGUIDCOL
) ON [PRIMARY]
ALTER TABLE dbo.Table1 ADD CONSTRAINT
DF_Table1_test DEFAULT (newid()) FOR test
-- Bill
"Alex via droptable.com" <no@.spam.pls> wrote in message
news:6bd9f60658969@.uwe...
> Or can I at least use newsequentialid() instead of newid() as the ROWGUID
> default?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums.aspx/sql-server-replication/200701/1
>
|||Thank you for your response. It seems your code is still using newid(), but
anyway it is not what I was asking. The MS documentation says that one can
create replication ROWGUID column manually as long as it have the following
characteristics:
* The data type as UNIQUEIDENTIFIER.
* The default as NEWID().
* The ROWGUIDCOL property.
* A unique index on the column.
My questions are:
1. Can I use newsequentialid() instead of newid() ?
2. Can I supply GUID from my client code instead of using this default value?
I am interested in transactional replication model with updating subscribers.
AlterEgo wrote:[vbcol=seagreen]
>Alex,
>Yes,
>CREATE TABLE dbo.Table1
> (
> test uniqueidentifier NOT NULL ROWGUIDCOL
> ) ON [PRIMARY]
>ALTER TABLE dbo.Table1 ADD CONSTRAINT
> DF_Table1_test DEFAULT (newid()) FOR test
>-- Bill
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-replication/200701/1