Problem with Script Printout Alignment
Hi Experts,
I have a Long text. in the long text I have maintained some static text ( text in Table format. long text has vertical and horzontal lines.)
I have checked in print priview of long text, the alignment is working fine.
I have called this long text in One Script Via Include statement.
But in print priview of the script, this long text is not printed properly. i.e. Alignment is missing.
I have debugged the Script, In debugging the long text is seeing good in alignment.
But in print priview of the script is not working.
Please Suggest me how to get correct the alignment in Script Print Priview.
Thanks in Advance.
Hi,
the alignment of text in printed output depends on the font used. There are fixed-width fonts (like COURIER) where every char (including SPACE) has same width.
And there are proportionally spaced fonts (HELVE, TIMES) where chars have different widths. So SAPscript must calculate alignment (if you want e.g. centered or block-aligned formatting) depending on the actual font used (this is determined by the used pritner+device type).
The active font is selected in your form (or a style if you are using one).
In the debugger you cannot see if text is properly "aligned" when using a proportional font.
If you want table-like layout in SCR (like text in two columns), you cannot use spaces between columns when a prop. font is used, you should use tabulator moves (,, in the form) to align. For this, define tab positions in a paragraph definition in your form.
Regards,
Alex
Similar Messages
-
Problem with script- Space alignment
Hi All,
I have problem on space alignment for sapce script.
See the screen shot of my problem
For example:
Material Number quantiy Flag
68965 110.00 N
2343255 20.00 N
See here the record displaying correctely, but its came to second record its not happing correct format. I used Right Justfied option also, but not any solution.
If any know help on this issue.
Regards
GangiHi,
Try by displaying using
&g_t_mara-matnr(*)&.
--- takes length from the dictionary
patil -
SAP script printout alignment issue
Hi Experts,
I have facing one Script Printout Alignment issue.
SAP Script Form printing some Values in Table format.
While debugging( in debug mode ), I am getting the correct Alignment ( Proper table format with values ).
But in printout the Alignment( The vertical and horizontal lines are not printed properly ) is not correct.
Thanks in Advance.HI Glen Anthony,
I am not using any printer details.
from the Spol (SP01) I am checking the print priview.
Success in debug mode but not in Print.
Please suggest.
Thanks -
Problems with portrait/landscape alignment at DIA show.
Problems with portrait/landscape alignment at DIA show.
At DIA show the landscape / portrait alignment is mixed up some times, and getting worse if I go forward backward. Also the size is sometimes not correct. I have roughly 2000 pictures. If I see the pictures in normal sorting view or the working view, it is fine. I am using mac book air. OS and iPhoto using the latest version. I am using German language. I expect this problem has come with iPhoto 11. Before it was working fine.
I have already written a mail to apple, maybe I get a replay. But maybe somebody could tell me how to fix this problem. I have tried to fix this with iPhoto Library manager without success.
BR
GodeWhat version of iPhoto do you have? 9.4.1? And which theme are you using for your slide show in iPhoto? Is it one of the new themes designed for a mixture of portrait and landscape photos, like "Holiday Mobile" or "Scrapbook"?
It lloks like your library has a corruption.
I have tried to fix this with iPhoto Library manager without success.
Have you also tried the built-in library first aid tools? See: iPhoto 6 and later: Rebuilding the iPhoto library
Regards
Léonie
P.S: This is the iPhoto on IOS forum. I'll ask the hosts to move your question to the iPhoto - iLife forum. -
there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot
This issue can be caused by an extension that isn't working properly.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode -
Problem with Script Alignment for new printer
Hi All,
I'm printing SAP checks to LOCAL printer. Currently we are using Dell W5300n to print checks and the printer has a lot of maintenance problems. Therefore we purchase a new printer Dell 3110cn and would like to have it set up to print checks. We would still keep old printer ( Dell W5300n ) for back up.We changed the printer to new as there is some problem with old printer.
Problem is , if we print a check from using old printer, the check alignment is good. But if we print a check from new printer, the check alignment is off.
I'm using DINA4 Page format.
Can you please tell me what is the problem here?
Thanks,
SubhaHi Subhashini Kuntala,
For your issue there are few things to check ...
1. We need to find exact Printer (new) drivers which matches exactly the (old) Printer.
2. Is your cheque is in A4 size or Customised size.
3. If it is A4 try to print in Other Printer.
If these senerio's does't work, as a ABAPer You can't do anything else .. So, best to pass this issue to BASIS.
That could resolve your Problem.
Regards,
sg -
Having multiple problems with script - NTFS Permissions and AD Groups
Hi, all! I'm having multiple problems with my first script I've written with Powershell. The script below does the following:
1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
3. If a global folder, prompts for the name. If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier. I've prompted for this information in this way because the information
is used differently later on in the script.
4. Verifies the entered information and requests confirmation to proceed.
5. Creates the folder.
6. Creates an AD OU and/or security group(s).
7. Applies appropriate security groups to the new folder and removes undesired permissions.
Import-Module ActiveDirectory
$Division = ""
$DivAbbr = ""
$OU = ""
$OUDrive = "AD:\"
$FolderName = ""
$OUName = ""
$GroupName = ""
$OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
$FSRoot = "E:\"
$FolderPath = ""
$DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
[bool]$Location = 0
do {
$userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
Switch ($userInput)
W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
S {"Staffing is not yet implemented."; break}
P {"Packaging is not yet implemented."; break}
default {"Invalid choice. Please re-enter."; break}
while ($DivAbbr -eq "")
write-host ""
write-host ($Division + " was selected.")
$FolderPath = $Division + "\"
write-host ""
$choice = ""
do {
$choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
Switch ($choice)
G {$Location = $false; break}
L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
default {"Invalid choice. Please re-enter."; $choice = ""; break}
while ($choice -eq "")
write-host ""
write-host ("Location is set to: " + $Location)
write-host ""
if ($Location -eq $false) {
$FolderName = Read-Host "Please enter folder name:"
$GroupName = $DivAbbr + " " + $FolderName
} else {
$input = Read-Host "Please enter two-letter state abbreviation:"
$FolderName = $FolderName + $input + " "
$input = Read-Host "Please enter city:"
$FolderName = $FolderName + $input + " "
$input = Read-Host "Please enter street address number only:"
$FolderName = $FolderName + $input
$GroupName = $DivAbbr + " " + $FolderName
$FolderName = $FolderName + " "
$input = Read-Host "Please enter street name:"
$FolderName = $FolderName + $input
$input = Read-Host "Please enter any optional information to appear in folder name:"
if ($input -ne "") {
$FolderName = $FolderName + " " + $input
$OUName = $FolderName
write-host
write-host "Path for folder: "$FSRoot$FolderPath$FolderName
write-host "AD Path: "$OUDrive$OU$OURoot
write-host "New OU Name: "$OUName
write-host -NoNewLine "New Security Group names: "$GroupName
if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
write-host
$input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
if ($input -ne "Y") { Exit }
write-host
write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
Write-Host "Folder already exists! Skipping folder creation..."
} else {
write-host "Folder does not exist. Creating..."
new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
Set-Location ($FSRoot + $FolderPath + $FolderName)
if ($Location -eq $true) {
$tempOUName = "ou=" + $OUName + ","
write-host
write-host $OUDrive$tempOUName$OU$OURoot
write-host
write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
Write-Host "OU already exists! Skipping OU creation..."
} else {
write-host "OU does not exist. Creating..."
New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
$GroupNameMGMT = $GroupName + " MGMT"
if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
$FolderACL.SetAccessRuleProtection($True,$True)
# $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
$BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
$BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
write-host $BIUsersSID.Value
# out-string -inputObject $BIUsers
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
$FolderACL.RemoveAccessRuleAll($Ar)
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
get-acl ($FSRoot + $FolderPath + $FolderName) | fl
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
$ADGroupName = "JACOBSON\" + $GroupName
$objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
$objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
write-host $ADGroupName
write-host $objUser.Value
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
Out-String -InputObject $ar
$FolderACL.AddAccessRule($Ar)
$ADGroupName = "JACOBSON\" + $GroupNameMGMT
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
Out-String -InputObject $ar
$FolderACL.AddAccessRule($Ar)
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
} else {
$tempOUName = "cn=" + $GroupName + ","
write-host
write-host $OUDrive$tempOUName$OU$OURoot
write-host
write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
Write-Host "Security group already exists! Skipping new security group creation..."
} else {
write-host "Security group does not exist. Creating..."
New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
$ADGroupName = "JACOBSON\" + $GroupName
$FolderACL.SetAccessRuleProtection($True,$True)
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
$FolderACL.AddAccessRule($Ar)
$FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold. Yes, I am running this script as an Administrator.
First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder. I've tried to remove the group in several different ways, and none are having any effect. Oddly, if I type in the lines directly
into Powershell, they work as expected. I've tried the following methods:
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
$FolderACL.SetAccessRuleProtection($True,$True)
$FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
$FolderACL.SetAccessRuleProtection($True,$True)
$BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
$BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
$FolderACL.RemoveAccessRuleAll($Ar)
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
In the second case, I get the following error message:
Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
+ $FolderACL.RemoveAccessRuleAll($Ar)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IdentityNotMappedException
This seems strange that the local server is unable to translate the SID of a BUILTIN account. I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error. I've
also tried the solutions given in this thread:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated." I thought I had found a workaround to the problem by adding the -PassThru option to
the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
My first Powershell script has been working well up to this point and now I seem to have hit a showstopper. Any help is appreciated.
Thanks!I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
again utilizing the -Server parameter on the Get-ADGroup command:
get-acl ($FSRoot + $FolderPath + $FolderName) | fl
$FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
# Add the new normal users group to the folder with Read and Execute permissions
$GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
$SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
$FolderACL.AddAccessRule($Ar)
# Add the management users group to the folder with Modify permissions
$GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
$SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
$Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
$FolderACL.AddAccessRule($Ar)
Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule. It's been working fairly consistently.
Still having issues with the translation of the BUILTIN\Users group, though. -
Problem with picture/text alignment using layers
Hello,
Here is the page I am having problems with:
http://tumultimedia.org/tumultimedia/ah.html
I am having major issues. All I wanted to do was have a
column on the left with a picture and a column on the right with
text. I wanted the text to align exactly with the top of the
picture (the text on the right of the picture and the menu to the
left of the picture), but the B-Ball text floated down to the
middle even though I said align top.
So I then took the layers approach. I brought down the
little guide and aligned it perfectly. It looks great in Internet
Explorer, but Safari looks completely un-aligned and so does Opera.
I'm new at layers, so it is probably something very simple.
All I want is to have the first subject of the menu line up
with the picture line up with the first line of the B-Ball text and
have it look the same for most browsers.
Any help would be greatly appreaciated.
Thank YOU!Hi AlexGregory,
If you are having issues sending or receiving MMS messages with users on other phone platforms, you may find the following article helpful:
iOS: Troubleshooting Messages
http://support.apple.com/kb/ts2755
Regards,
- Brenden -
Problem with Script Events Manager buttons not showing up
Hi,
First off let me say that the latest release of Adobe products is a steaming pile of @#$#$.
Countless software issues, it's slow, buggy, you name it.
That being said, has anyone had this problem and know how to fix it.
My Script Events Manager is broken. Yes broken. The only buttons I see are "Done" and "Remove". There is no "Add" button so that I can actually add events. Someone please tell me this is user error and that I don't need to reinstall PS.My system has 8 Gb of Ram and 4 processors. I doubt it's the system. I've had problems with CS Master Collection since day one. My main complaint is the ******* tabs and interface. Everything is so chunky. CS2 was smooth as butter. They keep making their products use more RAM and it's ridiculous. The tabs don't help, they only make life harder.
Thanks for the suggestions, I was hoping not to have to reinstall PS, but looks like it's the only option. -
hello to all
i have a little problem with my script
I ask you if there is the possibility to activate randomize order in a text animator with script
i have a check box and i try with this function that is
function make_random(random){
if(random){
var animator1 = layer.Text.Animators.addProperty("ADBE Text Animator");
var selector1 = animator1.Selectors.addProperty("ADBE Text Selector");
animator1 = animator1.Properties;
animator1.addProperty("ADBE Text Randomize Order").setValue([on]);
}else{
but do not work
can someone halp me please?
sorry for my englishSee my reply on your other post:
http://forums.adobe.com/thread/1312888?tstart=0 -
Problem with script when downloading
Hi,
I have a problem with downloading Flash Player to my XP, Internet Explorer computer.
All of the time I get the message saying that a problem has occured with the script on this page. I have tried several times and at the end of the download procedure this happens all the time. I have enabled scripting and it has been working for all years until now. Here you can see the message I get (in swedish):
Is there anyone who can give me a tips on how to get Flash Player?Hello,
Welcome to Adobe Forums.
You can download Adobe Flash Player offline installer, links on this document :
http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html
Thanks,
Vikram -
Greetings,
I'm having a problem with a Script. In Adium, I'm trying to use a Script called "quoteDB" that basically picks up a random quote from a file and shows it. Since I'd like to use it to change my display name from time to time, my problem is that the script runs every 20 seconds, so my name also changes..
My question is: does anyone knows how to configure the script "delay", I mean, how to introduce some kind of "wait" ou "idle"..
Here's the script:
on substitute(filePath)
set filePath to (filePath as alias)
open for access filePath
set raw to read filePath using delimiter "
close access filePath
set quotes to {""} as list
set j to 1
repeat with i from 1 to number of items in raw
set this_item to (text item i of raw)
if (this_item is "-") then
set quotes to quotes & ("" as item)
set j to j + 1
else
set item j of quotes to (item j of quotes & (this_item & ""))
end if
end repeat
return some item of quotes
end substitute
Thanks a lot.
rcThe statement for a delay is:
delay 60
where the time is the number of seconds (60, or one minute in my example). There is also an idle handler in a stay-open script, that uses the number of seconds returned for the interval until the next time the handler is run:
on idle
return 60
end idle
I don't know what you are using to run the script every 20 seconds (or why your name is changing), so there may be a conflict with the various timings. -
Certain sites, most recently The Daily Show, will not load for me. I get a box that says:
"Warning: unresponsive script
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: resource://gre/modules/ConsoleAPIStorage.jsm:157
[Continue] [Stop script]"
Whether I click to continue or stop the script, nothing happens except that the box goes away and then comes up again. If I try to close the tab, it just hangs and then finally shows the box again.
Finally, Firefox just gets completely hung up, and I have to close it out with the task manager.
Meanwhile, everything runs fine in Internet Explorer.
Can anyone please help me solve this problem?
Thanks,
EllenIs DOM storage enabled?
You can check the value of the dom.storage.enabled pref on the about:config page.
*http://kb.mozillazine.org/about:config
You can also try to delete the webappsstore.sqlite file in the Firefox Profile Folder to remove all data (cookies) stored in DOM storage.
You can use this button to go to the Firefox profile folder:
*Help > Troubleshooting Information > Profile Directory: Open Containing Folder
*http://kb.mozillazine.org/Profile_folder_-_Firefox
You can try to reset Firefox and create a new profile.
*https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems -
Problem with Script logic logs
Hi Experts,
I am using BPC 7.5M with SQL Server 2008, I am looking into script logic log but found one very strange statement "(More than 300,000 records. Details are not being logged)", Earlier it was not showing this statement and was showing all the entries to be posted, Is there any setting we need to do for having all the entries in the log file.
Status log file showing as of now:
App: HEADCOUNT - Records to be posted are 310875 (calc diff = 0)
(More than 300,000 records. Details are not being logged)
Time to validate records: 100.3 sec.
Post Record Status
Submit count : 100001
Accept count : 100001
Reject count : 0
Post Record Status
Submit count : 200002
Accept count : 200002
Reject count : 0
Post Record Status
Submit count : 300003
Accept count : 300003
Reject count : 0
Post Record Status
Submit count : 310875
Accept count : 310875
Reject count : 0
Posting ok
Time to post records:325.4 sec.
Please Advice
Thanks & Regards,
RohitHi Rohit,
This is not a problem.
If the resultant number of records is more than 300,000, then the records are not logged.
This can be controlled by the UNLIMIT_PRINT_LOG appset parameter. By default, this is set as NO. This will allow only 300k records to be logged.
You can set the above parameter as YES to log all the records for the execution of all logics across the appset in all applications.
Warning:
Of course, it will add slow down the logic execution. Logging the records will always slow down the execution. The system has to open the file and keep writing all the records in the flatfile, which is a slow process. You can increase the speed of your logics by disabling this logging completely by using the CALCULATE_DIFFERENCE statement in your script logic for each commit section. You can reduce the logic execution time by disabling this logging.
Karthik AJ -
Problem with Script Task formatting excel
Hi Experts,
I am creating a package and using Script task to format one excel dimension file, now the problem is if I execute the package from BIDS designer with static values then the package executes fine with excel file formatted perfectly fine but if I execute same package in BPC via Data manager with values used from variables it gives error on script task message:
"Description = System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'E:\PC_MS\Data\Webfolders\CDNPLAN\AdminApp\Stage\Employee.xls'. There are several possible reasons:
u2022 The file name or path does not exist.
u2022 The file is being used by another program.
u2022 The workbook you are trying to save has the same name as a currently open workbook.
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at ScriptTask_2921447fa19c44dfae73d5370828ba94.vbproj.ScriptMain.Main()
Now to crosscheck I commented the dynamic variables from the code and used same static values with Data manager as they are in BIDS but it didn't help, please find the code below and help me in solving this problem or just give me some clue to come out if this:
Thanks & Regards,
Rohit
Code
Public Sub Main()
' Add your code here
'Dim FileName As String = Dts.Variables("MYWEBFOLDERS").Value & Dts.Variables("MYAPPSET").Value & "\AdminApp\Stage\" & Dts.Variables("MYDIMNAME").Value & ".xls" This I commented as it was using dynamic variables
Dim FileName As String = "E:\PC_MS\Data\Webfolders\CDNPLAN\AdminApp\Stage\Employee.xls"
Dim WB As Object ' Workbook
Dim WS As Object 'Worksheet
Dim W As Object 'Window
Dim XL As Object 'Application
XL = CreateObject("Excel.Application")
XL.DisplayAlerts = False
' Open the workbook
WB = XL.Workbooks.Open(FileName)
' WB = GetObject(FileName)
' XL = WB.Parent
' XL.DisplayAlerts = False
WS = WB.Worksheets(1)
W = WB.Windows(WB.Name)
' Change the name of the worksheet to MEMBERS
WS.Name = "MEMBERS"
' Set up the split and freeze the panes
W.SplitRow = 1
W.SplitColumn = 1
W.Split = True
W.FreezePanes = True
' Make it visible
W.Visible = True
' Replace *ID column header with ID
Dim Row1 As Object
Row1 = WS.UsedRange.Rows("1:1")
Dim I As Integer
For I = 1 To Row1.Columns.Count
If Row1.Cells(I, 1).Value = "*ID" Then
Row1.Cells(I, 1).value = "ID"
Exit For
End If
Next
' Paste Values
WS.UsedRange.NumberFormat = "@"
WS.UsedRange.Value = WS.UsedRange.Value
' Change the font of everything to Arial,9
With WS.Cells.Font
.Name = "Arial"
.Size = 9
End With
' Format the top row to be bold and orange
With WS.Rows("1:1")
.Font.Bold = True
.Interior.ColorIndex = 44 'orange
End With
' Auto-fit all the columns
WS.Cells.EntireColumn.AutoFit()
' Convert to Excel format
Const xlNormal = -4143
WB.Parent.DisplayAlerts = False
WB.SaveAs(FileName:=FileName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False)
' Close and save changes
WS = Nothing
WB.Close()
W = Nothing
' Quit Excel
XL.Quit()
XL = Nothing
Dts.TaskResult = ScriptResults.Success
End SubHi,
If you do not define GLOBAL VARIABLE in your BPC package and BIDS, why don't you try to have it? you should specify the webfolder and file name in advanced script, then you also need to create global variable as text type in BIDS.
I saw many cases BPC does not pass the dynamic variable to BIDS, therefore I changed the type of variable as the Global variable and it works for me.
Regards,
YH Seo
Maybe you are looking for
-
HP Color LaserJet Pro MFP M177fw - PostScript support?
Hi, I'm looking to purchase a new printer/scanner/copier(/fax is a nice to have, but not mandatory), and I'm deciding between the following models: HP LaserJet Pro 100 color MFP M175nw HP Color LaserJet Pro MFP M177fw PostScript support is important
-
After 8.1.1 update, iTunes won't make a window
No errors on update. When iTunes starts it runs, but only has minimal menus (just "iTunes" and "Help") and doesn't have a window. "Quit iTunes" is greyed out, only way to stop it is to force quit. Tried a couple of machine restarts, no joy. How do i
-
SQL Server 2008 Installation on Windows 7
I tried to install SQL Server 2008 on a Windows 7 Home Premium 64 bit (Enterprise Edition Trial Edition). The system check was ok and the installation started successfully but at the end there were some errors. In the logfile there were stacktraces d
-
hi i have seem people using the exact card as me when they use 3dmark they seem to have pure hardware accelration but i do not have this . How can i get it to be pure harware as that person with the exact specs is getting over 1000marks more than me.
-
06 28 update program not running
I downloaded and installed the latest update to my pc. I installed it and rebooted like requested. I tried running the update by 1. plugging in my ipod and it telling me there is an update to click button to run the update program 2. tried running it