How To Disable Pop Up Message Which Display Query During Print Preview. S’abonner
Hi,
While going for print preview in bar tender using SDK and while clicking on print preview i am getting a pop up message that contains query, is there any way to disable or avoid that pop up message so that i can go to print preview directly without getting query during the process.
8 commentaires

Shotaro Ito
From BarTender .net Print SDK, Query prompt cannot be disabled unless Window visibility is set to None.
However you can specify value from QueryPrompts[<Query prompt name>].Value, and dialog won't be shown when all query prompt values have set.
You can disable other dialogs from SDK - like below.
[code]
//Assume btFormat is LabelFormat object, and
//Engine.Window.VisibleWindows is Seagull.BarTender.Print.VisibleWindows.InteractiveDialogs (or All).
//Set query prompt value
btFormat.DatabaseConnections.QueryPrompts["QueryPrompt1"].Value="0001";
//Disable record selection dialog
btFormat.PrintSetup.SelectRecordsAtPrint = false;
//Disable user prompt
btFormat.PrintSetup.EnablePrompting = false;
[/code]
hope that helps!
If that's error / warning message, please tell me the message # too.
If this is not the case though...
1. Do you get this appear when using the BarTender application manually?
2. Test to see if this is label format related by creating a simple label that connects to the same database in a similar way with just a couple of linked label objects.
3. In the database set-up for the label format, select the "Options" tab, click the "OLE DB Messages" button and tick the "Ignore all errors" check box and save the label. Does that make any difference?
It looks you show popup dialog if any message is returned, right?
Yes, without good reason, it looks .net Print SDK Print method returns Message #1200:Information:SQL Statement in messages object, even the message has been disabled in BarTender's Administer > Application Message setup.
Since this message is just information, you can ignore this message in your code.
Something like below.
[code]
// Print the format.
btFormat.Print(btFormat.BaseName, out messages);
// Show all messages but #1200
string result = "";
foreach (Seagull.BarTender.Print.Message m in messages){
if (m.ID != 1200)
{
result = result + m.ID + ":" + m.Severity + ":" + m.Text + "\r\n";
}
}
if (result != "")
{
MessageBox.Show(result);
}
[/code]
I'll check the current behavior is intended or not.
messageString = messages.Where(m=>m.ID != 1200).Aggregate("Messages:" , (current, message) => current + ("\n\n" + message.Text));
Hi.
I've Failure Message on this code and nothing print, but sometimes it prints and show message
// Start the BarTender print engine. btEngine.Start(); // Open a format. LabelFormatDocument btFormat = btEngine.Documents.Open(labelpath, printer); ((OLEDB)btFormat.DatabaseConnections[0]).SQLStatement = SQL; btFormat.PrintSetup.IdenticalCopiesOfLabel = copies; Messages btMessages; // Print the format. Result nResult = btFormat.Print("OUT Sticker", out btMessages); if (nResult != Result.Success) { foreach (Message m in btMessages) alert += "Category = " + m.Category + " ID = " + m.ID + " Severity = " + m.Severity + " Text = " + m.Text + " "; //"Text = " + m.Text; }
Category = Printer ID = 1200 Severity = Information Text =
SQL Statement: SELECT "Article", "Date Insert",
"Description", "GuidNo", "ID",
"Param1", "Param10", "Param11",
"Param12", "Param13", "Param14",
"Param15", "Param16", "Param17",
"Param18", "Param19", "Param2",
"Param3", "Param4", "Param5", "Param6",
"Param7", "Param8", "Param9", "Printer
Name", "Processed", "Qty", "Request Necessary
Date", "RequestId", "SAD No_ Barcode", "Ship-to
Priority", "SN", "Sticker No_", "TQty",
"User", "WO Reqd_ Date", "WO Reqd_ WeekDay" FROM
"dbo"."xxxxxxxxx" WHERE
"GuidNo" = '4C3176D2-E0BC-4A42-99F5-B047AA8DC45C' ORDER BY
"ID" "
It's on Zebra ZM400. But this format at the same time sucessfully prints on other printers (ZM400, Z4MPlus)
After restart server it works correctly till some point.
What could be the problem?
Driver on all ZM400 identical ... Seagull
Bartender version: 9.01
Vous devez vous connecter pour laisser un commentaire.