Showing posts with label changing. Show all posts
Showing posts with label changing. Show all posts

Wednesday, March 28, 2012

How can I change the reports wizard templates?

I can easily create reports using the wizard, but I have to spend a lot of
time changing them.
Is there a way to change the templates the wizard uses?No. But you can create your own basic report as a template and change the
items needed by hand instead of using the wizard.
--
| From: "geri" <dsfds>
| Subject: How can I change the reports wizard templates?
| Date: Thu, 6 Jan 2005 12:21:10 +0200
| Lines: 5
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <OT9Urm98EHA.3828@.TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: dbk-exc.dubek.co.il 62.219.254.181
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.reportingsvcs:38816
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I can easily create reports using the wizard, but I have to spend a lot of
| time changing them.
| Is there a way to change the templates the wizard uses?
|
|
||||This is a multi-part message in MIME format.
--=_NextPart_000_002E_01C50EA5.CCFB9680
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Then can you explain what the RS BOL topic "Creating a Report Using =Report Wizard" means by "Report Designer provides four style templates: =Bold, Casual, Corporate, and Compact. You can alter existing templates =or add new ones by editing the StyleTemplates.xml file in the =\80\Tools\Report Designer\Business Intelligence Wizards\Reports\Styles =folder in the Microsoft SQL Server program folder. This folder is =located on the computer on which Report Designer is installed. ", Please =? (Bold, italics, mine...)
""Brad Syputa - MS"" <bradsy@.Online.Microsoft.com> wrote in message =news:7BlC$jF9EHA.764@.cpmsftngxa10.phx.gbl...
> No. But you can create your own basic report as a template and change =the > items needed by hand instead of using the wizard.
> --
> | From: "geri" <dsfds>
> | Subject: How can I change the reports wizard templates?
> | Date: Thu, 6 Jan 2005 12:21:10 +0200
> | Lines: 5
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> | Message-ID: <OT9Urm98EHA.3828@.TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: dbk-exc.dubek.co.il 62.219.254.181
> | Path: > =cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNG=P09
> phx.gbl
> | Xref: cpmsftngxa10.phx.gbl =microsoft.public.sqlserver.reportingsvcs:38816
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> | > | I can easily create reports using the wizard, but I have to spend a =lot of
> | time changing them.
> | Is there a way to change the templates the wizard uses?
> | > | > | >
--=_NextPart_000_002E_01C50EA5.CCFB9680
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Then can you explain what the RS BOL =topic "Creating a Report Using Report Wizard" means by "Report Designer =provides four style templates: Bold, Casual, Corporate, and Compact. You =can alter existing templates or add new ones by editing the StyleTemplates.xml =file in the \80\Tools\Report Designer\Business Intelligence Wizards\Reports\Styles =folder in the Microsoft SQL Server program folder. This folder is =located on the computer on which Report Designer is installed. ", Please ? =(Bold, italics, mine...)
""Brad Syputa - MS"" wrote in message news:7BlC$jF9EHA.764@.cpmsftngxa10.phx.gbl...> =No. But you can create your own basic report as a template and change the > items =needed by hand instead of using the wizard.> =--> | From: "geri" > | Subject: How can I change the =reports wizard templates?> | Date: Thu, 6 Jan 2005 12:21:10 +0200> =| Lines: 5> | X-Priority: 3> | X-MSMail-Priority: =Normal> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437> | =X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441> | Message-ID: > | Newsgroups: microsoft.public.sqlserver.reportingsvcs> | NNTP-Posting-Host: dbk-exc.dubek.co.il 62.219.254.181> | Path: > cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNG=P09> phx.gbl> | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.reportingsvcs:38816> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs> | > | I can =easily create reports using the wizard, but I have to spend a lot of> | =time changing them.> | Is there a way to change the templates the =wizard uses?> | > | > | >

--=_NextPart_000_002E_01C50EA5.CCFB9680--|||This is a multi-part message in MIME format.
--=_NextPart_000_0090_01C50EB7.5E3039B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You CAN change the templates, but the BOL topic is deficient...
1.. CREATE A BACKUP of the StyleTemplates.xml file in the folder cited =in BOL (see post below).
2.. Open the file in a text editor (your favorite or XML editor...)
3.. Locate the "StyleTemplate" you want to change, e.g. "Compact"
4.. Make sure you understand what each element does. Refer to the BOL =Index for detailed info, e.g., "BorderWidth element" will give you blurb =on that element as used in rdl's AND the Template.
5.. Color values have NO spaces between words, e.g. Steel Blue is =coded SteelBlue.
6.. Font names CAN include spaces, e.g. <FontFamily>Arial =Black</FontFamily>
7.. DO NOT include a <TextAlign> pair in the "Table Header" Style - VS =barfs! (It seems to want to apply the alignment of the cell to the =corresponding table header cell - DUH!) A new post to be seen by MS =will hopefully get this recognized as a bug (if it hasn't already =been...).
8.. Despite setting a default font within the "Table" style, if you =expect it to be used when you add a Group, dream on...
9.. Save the edited XML file.
10.. NOW COPY THE SUCKER TO YOUR "LANGUAGE" FOLDER UNDER THE ..\Styles =FOLDER... e.g., for English, copy it to ..\Styles\EN\
11.. REBOOT (emotive term!) Visual Studio - it appears to cache the =Style file's XML the first time you use the "New Report Wizard".
Experiment with the Style File and you may be able to control things =like the page size, grid size, etc., but I've yet to pluck up that =degree of courage...
Hope this helps...
"SS_Newbie" <SS_Newbie@.community.nospam> wrote in message =news:uxuddjuDFHA.328@.tk2msftngp13.phx.gbl...
Then can you explain what the RS BOL topic "Creating a Report Using =Report Wizard" means by "Report Designer provides four style templates: =Bold, Casual, Corporate, and Compact. You can alter existing templates =or add new ones by editing the StyleTemplates.xml file in the =\80\Tools\Report Designer\Business Intelligence Wizards\Reports\Styles =folder in the Microsoft SQL Server program folder. This folder is =located on the computer on which Report Designer is installed. ", Please =? (Bold, italics, mine...)
""Brad Syputa - MS"" <bradsy@.Online.Microsoft.com> wrote in message =news:7BlC$jF9EHA.764@.cpmsftngxa10.phx.gbl...
> No. But you can create your own basic report as a template and =change the > items needed by hand instead of using the wizard.
> --
> | From: "geri" <dsfds>
> | Subject: How can I change the reports wizard templates?
> | Date: Thu, 6 Jan 2005 12:21:10 +0200
> | Lines: 5
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> | Message-ID: <OT9Urm98EHA.3828@.TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: dbk-exc.dubek.co.il 62.219.254.181
> | Path: > =cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNG=P09
> phx.gbl
> | Xref: cpmsftngxa10.phx.gbl =microsoft.public.sqlserver.reportingsvcs:38816
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> | > | I can easily create reports using the wizard, but I have to spend =a lot of
> | time changing them.
> | Is there a way to change the templates the wizard uses?
> | > | > | >
--=_NextPart_000_0090_01C50EB7.5E3039B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

You CAN change the templates, but the =BOL topic is deficient...
CREATE A BACKUP of the =StyleTemplates.xml file in the folder cited in BOL (see post below).
Open the file in a text editor (your =favorite or XML editor...)
Locate the "StyleTemplate" you =want to change, e.g. "Compact"
Make sure you understand what each =element does. Refer to the BOL Index for detailed info, e.g., "BorderWidth element" =will give you blurb on that element as used in rdl's AND the =Template.
Color values have NO spaces between =words, e.g. Steel Blue is coded SteelBlue.
Font names CAN include spaces, e.g. Arial Black
DO NOT include a =pair in the "Table Header" Style - VS barfs! (It seems to want to apply the =alignment of the cell to the corresponding table header cell - DUH!) A =new post to be seen by MS will hopefully get this recognized as a bug (if it =hasn't already been...).
Despite setting a default font within =the "Table" style, if you expect it to be used when you add a Group, dream on...
Save the edited XML file.
NOW COPY THE SUCKER TO YOUR "LANGUAGE" =FOLDER UNDER THE ..\Styles FOLDER... e.g., for English, copy it to ..\Styles\EN\
REBOOT (emotive term!) Visual Studio - =it appears to cache the Style file's XML the first time you use the "New =Report Wizard".
Experiment with the Style File and you =may be able to control things like the page size, grid size, etc., but I've yet to =pluck up that degree of courage...
Hope this helps...
"SS_Newbie" wrote in message news:uxuddjuDFHA.328@.t=k2msftngp13.phx.gbl...
Then can you explain what the RS BOL =topic "Creating a Report Using Report Wizard" means by "Report Designer =provides four style templates: Bold, Casual, Corporate, and Compact. =You can alter existing templates or add new ones by editing the =StyleTemplates.xml file in the \80\Tools\Report Designer\Business Intelligence Wizards\Reports\Styles folder in the Microsoft SQL Server program folder. This folder is located on the computer on which =Report Designer is installed. ", Please ? (Bold, italics, mine...)

""Brad Syputa - MS"" wrote in message news:7BlC$jF9EHA.764@.cpmsftngxa10.phx.gbl...> No. But you =can create your own basic report as a template and change the > items =needed by hand instead of using the wizard.> --> =| From: "geri" > | Subject: How can I change the reports =wizard templates?> | Date: Thu, 6 Jan 2005 12:21:10 +0200> | =Lines: 5> | X-Priority: 3> | X-MSMail-Priority: Normal> =| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437> | =X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441> | Message-ID: > | Newsgroups: microsoft.public.sqlserver.reportingsvcs> | NNTP-Posting-Host: dbk-exc.dubek.co.il 62.219.254.181> | Path: > =cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNG=P09> phx.gbl> | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.reportingsvcs:38816> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs> | > | I can =easily create reports using the wizard, but I have to spend a lot of> =| time changing them.> | Is there a way to change the templates the =wizard uses?> | > | > | >

--=_NextPart_000_0090_01C50EB7.5E3039B0--

Sunday, February 19, 2012

HostName and ReinitializeSubscription

Hello all,

I'm having trouble with my Merge Replication setup in regards to changing the HostName property of the SqlCeReplication object. As we all know, if you modify the HostName value, you must then call the ReinitializeSubscription(true) method before calling Synchronize(). Unfortunately, this isn't working for me. Following this sequence of steps consistently results in error messages saying that I need to either call ReinitializeSubscription, or change my HostName back to it's original value. Has anyone ever experienced this problem?

Regards,

Rob Tiffany

Hey Rob,

You are correct, once you specify a HostName value for a subscriber, if you want to change that value later, you must call SqlCeReplication.ReinitializeSubscription(True) followed by .Synchronize() to effectively make the change.

I built an app recently for a large field service scenario where the mobile device can change hands from field worker to field worker. I decided to use the field worker's unique identifier as the value for HostName so that I could replicate only the appropriate data for a given worker to a given SQL Mobile database. If the device changes hands, here is the process of making the change to HostName and reinitializing:

Public Function Synchronize() As Boolean

Dim retVal As Boolean = False

Dim repl As SqlCeReplication = GetReplication()

If repl Is Nothing Then
Return False
End If

Try

If Globals.GetInstance().HostNameChanged Then
repl.ReinitializeSubscription(True)
Globals.GetInstance().HostNameChanged = False
End If

repl.Synchronize()

etc etc etc

If you are doing something similar and getting an error, could you post the details on the error itself and Laxmi and I can look into it? Also, some info on your configuration (assume you are talking about SQL Mobile and SS2005?)

Regards,

Darren

|||

Yeah, that's what I'm doing too. My Sync code blocks looks like the following:

private void replicate(bool reInit)

{

SqlCeReplication repl = new SqlCeReplication();

repl.InternetUrl = Settings1.Default.InternetURL;

repl.InternetLogin = Settings1.Default.InternetLogin;

repl.InternetPassword = Settings1.Default.InternetPassword;

repl.Publisher = Settings1.Default.Publisher;

repl.PublisherDatabase = Settings1.Default.PublisherDatabase;

repl.Publication = Settings1.Default.Publication;

repl.PublisherSecurityMode = SecurityType.NTAuthentication;

repl.SubscriberConnectionString = @."Data Source=" + localFolder + "MyDB.sdf;Password=p@.ssw0rd;";

repl.Subscriber = Settings1.Default.Subscriber;

repl.HostName = txtAgentId.Text;

repl.CompressionLevel = Settings1.Default.CompressionLevel;

repl.ExchangeType = ExchangeType.BiDirectional;

try

{

if (!File.Exists(localFolder + "MyDB.sdf"))

{

repl.AddSubscription(AddOption.CreateDatabase);

}

if (reInit == true)

{

repl.ReinitializeSubscription(true);

}

// Synchronize with SQL Server 2005

repl.Synchronize();

}

finally

{

repl.Dispose();

}

}

If the user changes the HostName, then I pass "true" to the method above to call ReinitializeSubscription(true).

Thanks,

Rob

|||

there is a possible code path in your code where the database does not exist and you (are going to create it using AddOption.CreateDatabase on the first replication), but reinit can also be true - this won't work - you cannot mix CreateDatabase and Reinit in the same call to Synchronize.

Could that be what's happening? What error messages are you getting?

Darren

|||

I don't have the exact error message in front of me now, but is says something like:

Error: Changing the HostName requires a call to ReinitializeSubscription() or change your HostName back to the original value. HostName = 2, Original HostName = 1.

Something like that. Keep in mind that it will even throw this same error when I call ReinitializeSubscription().

To answer your other question, I haven't experienced the possible code path error you described where the database doesn't exist. It should also be known that this is a desktop XP project and not on Windows Mobile. Just in case we have subtle differences or issues between the desktop and handheld dlls. I'm trying to do some load testing and the desktop is the only way to create enough clients.

Rob